<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>editcommperiphrl.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">

function checkblank(f)
{ 


   fcmid=f.cmid.value
   fcmpc=f.cmpc.value
   fcmpsi=f.cmpsi.value
   fed=f.ed.value
   
  
   if((fcmid.length==0) || (fcmpc.length==0)|| (fcmpsi.length==0)|| (fed.length==0))
   {
      alert("pls fill all d fields")
      if(fcmid.length==0)
      {
         document.getElementById("lcid").innerHTML="<font color=red>Enter this field</font>"
      }
      if(fcmpc.length==0)
      {
         document.getElementById("lpc").innerHTML="<font color=red>Enter Postal code</font>"
      }
      if(fcmpsi.length==0)
      {
         document.getElementById("lpsid").innerHTML="<font color=red>Enter Police station id</font>"
      }
      if(fed.length==0)
      {
         document.getElementById("led").innerHTML="<font color=red>Enter effect date</font>"
      }
      return false;
  }
  else
  {
    if((fcmpc.length<6) || (fcmpc.length>6))
    {
      alert("Invalid postal code");
      return false;
    }
  }    
}
</script>
<script language="javascript" type="text/javascript" src="datetimepicker_css.js"></script>
<link href="css/style1.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="pink">
<div class="main-out">
<div class="main">
<div class="page">
<div class="top">
<div class="header">
<div class="header-top">
<%@include file="TopHead.jsp" %>
</div>
<div class="topmenu">
<%@include file="TopMenu.jsp" %>
</div>
<div class="">
<img src="images/d3.gif">
</div>
</div>
<div class="content">
<div class="content-left">
<div class="row1">
<div class="img">&nbsp;</div>
<div class="welcome">
<h1 class="title">Welcome to POlice Sewa<span></span></h1>
<p>




</p>

 <html:form action="upcomperia" onsubmit="return checkblank(this)">
<div align="center">
  
  <%
 
  //est.getSession(false);
			
  //String p=hs.getAttribute("")
    Object ob1=request.getAttribute("CI");
    Object ob2=request.getAttribute("PON");
    Object ob3=request.getAttribute("PSN");
    Object ob4=request.getAttribute("ED");
   System.out.print(ob1);
   System.out.print(ob2);
   System.out.print(ob3);
   System.out.print(ob4);
   
   %>

	<table border="0" width="60%">
	   <%if(ob1!=null)
	   {
	   System.out.print("lop......");
	    %>
		<tr>
			<td>COM ID</td>
			<td><html:text readonly="true" property="cmid" value="<%=ob1.toString() %>"></html:text></td>
			<td><label id=lcid></label> </td>
		</tr>
		<tr>
			<td>POST OFFICE</td>
			<td><html:text property="cmpc" value="<%=ob2.toString() %>"></html:text></td>
			<td><label id=lpc></label> </td>
		</tr>
		<tr>
			<td>POLICE STATION NAME</td>
			<td><html:text property="cmpsi" value="<%=ob3.toString() %>"></html:text></td>
			<td><label id=lpsid></label> </td>
		</tr>
		<tr>
			<td>Effect Date</td>
			<td width="76%">
<input type="text" name="T2" id="demo3" size="20" readonly="readonly" onfocus="javascript:NewCssCal('demo3','ddMMMyyyy','arrow')" value="<%=ob4.toString() %>">
</td>
			
			<td><label id=led></label> </td>
		</tr>
		
		
		
		<tr>
			<td align="center" colspan="2"><html:submit value="UPDATE" property="upcomperip"></html:submit></td>
		</tr>
		<%} %>
		
		<%
		  Object ob=request.getAttribute("tu");
		  if(ob!=null)
		  {
		  
		 %>
		<tr>
			
			<td><%=ob.toString() %></td>
		</tr>
		<%} %>
		
	</table>
</div>
</html:form>

</div>
</div>
</div>
<div class="content-right">
<%@include file="SideMenu.jsp" %>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>
<div class="bottom">
<!--DO NOT Remove The Footer Links-->
<p><%@include file="Footer.jsp"  %><br>
<!--DO NOT Remove The Footer Links-->
</p>
</div>
</div>
</div>
</div>
</body>
</html:html>
